package autoscale;

import cloudjunit.Config;
import cloudjunit.S3FileManager;


public class PrjFilesDownloader
{
	public static void main(String[] args)
	{
		if (args.length != 2)
		{
			System.err.println("usage(): <remotePath on S3> <localPath>");
			System.err.println("NOTE: config.properties needs to be in the current dir.");
			System.exit(2);
		}
		
		Config.initConfigWithConfigFile();
		
		try
		{
			S3FileManager.get().downloadFileFromS3(	Config.data.defaultS3Bucket, args[0], args[1]);
		}
		catch(Exception e)
		{
			e.printStackTrace();
			System.exit(1);
		}
		System.exit(0);
	}

}
